<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Adicionar Requisito</title>

<script type="text/javascript">
var selected = [],
acao,
win,
ADICIONA_TIPO_REQUISITO = 1;

jsool.onReady(function(){
	jsool
	.get("adicionaTipo")
	     .on("click",function(ev3){
	    	acao = ADICIONA_TIPO_REQUISITO;
	    	if(!win || win.closed){
				win = window.open('/requisiteworks/requisito/tipo/util/pesquisar.do'
					,"selectTipoRequisito"
					,'width=500,height=400,directories=no,location=no,menubar=no,resizable=0,scrollbars=1,status=no,toolbar=no'
					,true);
			}
			win.focus();
	});

});
</script>

</head>
<body>
	<fieldset>
			<legend>Novo Requisito</legend>
			
			<form:form modelAttribute="atributoRequisito"  action="/requisiteworks/requisito/tipo/atributo/adicionar.do" method="POST">
				<table class="form">
<tr>
						<td>
							<form:label path="tipo" cssErrorClass="erro">Atributos: </form:label>
						</td>
						<td>
							<select name="ntipo" multiple="multiple" id="atributos">
							</select>
							
							<img id="adicionaMembro" style="display: inline;" align="top" src="/requisiteworks/images/add.png" alt="IncluirMembro"/>
							<img id="deletaMembro" style="margin-left: -20px" src="/requisiteworks/images/delete.png" alt="DeletarMembro"/>
						</td>
						<td>
							<ul>
								<form:errors cssClass="erro" path="atributos" element="li"></form:errors>
							</ul>
						</td>
					</tr>
					
					<tr>
						<td>
							<form:label path="tipo.numero" cssErrorClass="erro">Atributo Tipo Requisito: </form:label>
						</td>
						<td>
							<form:hidden path="tipo.numero" id="numeroTipo"/>
							<form:input path="tipo.nome" id="nomeTipo" disabled="true" />
							<img id="adicionaTipo" style="display: inline;" align="top" src="/requisiteworks/images/add.png" alt="IncluirProjeto"/>							
						</td>
						<td>
							<ul>
								<form:errors path="tipo.numero" cssClass="erro" element="li"></form:errors>
							</ul>
						</td>
					</tr>
					
				</table>
				<button type="submit">Salvar</button>
			</form:form>
		</fieldset>
</body>
</html>